package old.gjp.service;

import old.gjp.dao.ZhangWuDao;
import old.gjp.domain.ZhangWu;

import java.util.List;

/**
 * @author DingZhenYun
 * @create 2019-03-22 11:03
 */
/*
 *  业务层类
 *  接收上一层,控制层controller的数据
 *  经过计算,传递给dao层,操作数据库
 *  调用dao层中的类,类成员位置,创建Dao类的对象
 */
public class ZhangWuService {
    private ZhangWuDao dao=new ZhangWuDao();


    public ZhangWuService() throws Exception {
    }
    public void editZhangWu(ZhangWu zw){
        dao.editZhangWu(zw);
    }
    public void addZhangWu(ZhangWu zw){
        dao.addZhangWu(zw);
    }
    public List<ZhangWu> select(String startDate,String endDate){
        return dao.select(startDate,endDate);
    }

    public List<ZhangWu> selectAll(){
        return dao.selectAll();
    }

    public void deleteZhangWu(int zwid) {
        dao.deleteZhangWu(zwid);
    }
}
